import request from '@/utils/request'


export default {
  // 保存小节信息执行的方法
  saveVideoInfo(video) {
    return request({
      url: `/eduservice/video/insertVideo`,
      method: 'post',
      data: video
    })
  },

  //   根据小节id获取小节信息
  getVideoInfoById(id) {
    return request({
      url: `/eduservice/video/getVideoInfo/` + id,
      method: 'get',
    })
  },

  //   更新小节信息
  updateVideoInfoById(video) {
    return request({
      url: `eduservice/video/updateVideo`,
      method: 'post',
      data: video
    })
  },

  //   删除小节
  removeByIdVideo(id) {
    return request({
      url: `eduservice/video/` + id,
      method: 'delete'
    })
  },

  // 根据视频id删除阿里云里面的视频
  removeById(videoId) {
    return request({
      url: `eduvod/video/removeAliVideo/` + videoId,
      method: 'delete'
    })
  }

}
